#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <stdint.h>

#define MIN(a, b)	((a) < (b) ? (a) : (b))

#define IDX(i)		((i) >> 6)
#define B(i)		((i) & 0x3F)

#define GET_BIT(a, i)	(((a) >> (i)) & 1)
#define SET_BIT(a, i)	((a) |= (1 << (i)))
#define UNSET_BIT(a, i)	((a) &= ~(1 << (i)))

struct vector {
	int *data;
	size_t length;
	size_t length_max;
};

// {{{ vector mng
void
vector_init_(struct vector *v)
{
	v->data = (int *) calloc((size_t) 4, sizeof *v->data);
	v->length = 0UL;
	v->length_max = 4UL;
}

void
vector_add(struct vector *v, int a)
{
	if (v->length + 1UL > v->length_max)
		v->data = (int *) realloc(v->data,
				(sizeof *v->data) * (v->length_max *= 2));
	v->data[v->length++] = a;
}

void
vector_kill_(struct vector *v)
{
	free(v->data);
	v->length = v->length_max = 0UL;
}
// }}}

void
print_first_100(const uint64_t * const sieve)
{
	int i;

	for (i = 1; i < 31; ++i)
		fputc(' ', stderr);
	fprintf(stderr, "%lu", GET_BIT(sieve[IDX(31)], B(31)));
	fputc('\n', stderr);

	for (i = 1; i <= 100; ++i)
		fprintf(stderr, "%lu", GET_BIT(sieve[IDX(i)], B(i)));
	fputc('\n', stderr);
}

void
e_s_populate(struct vector *v, int n)
{
#define MAX_N	MIN(843750, (n >> 6) + 1)
	uint64_t *sieve;
	register unsigned long long i, j;
	const int max_n = MAX_N;

	sieve = (uint64_t *) calloc(MAX_N + 1UL, sizeof *sieve);

	for (i = 2; IDX(i) <= max_n; i++) {
		if (!GET_BIT(sieve[IDX(i)], B(i))) {
			vector_add(v, (int) i);
			fprintf(stderr, "add %llu\n", i);
			for (j = i * i; IDX(j) <= max_n; j += i) {
				if (IDX(j) <= 20)
					fprintf(stderr, "j=%llu\tsieve[%02llu]:%-2llu=%lu <- 1\n",
							j, IDX(j), B(j),
							GET_BIT(sieve[IDX(j)], B(j)));

				SET_BIT(sieve[IDX(j)], B(j));
			}
			print_first_100(sieve);
		}
	}

	free(sieve);
#undef MAX_N
}

int
main(int argc, char **argv)
{
	int n, num;
	struct vector es;
	int i;
	bool first = true;

	scanf("%d", &n);
	printf("%d", n);

	vector_init_(&es);
	e_s_populate(&es, n);

	i = 0;
	num = n;
	while (num && i < es.length) {
		if (num % es.data[i] == 0) {
			printf(" %c %d", first ? (first = false, '=') : '*', es.data[i]);
			num /= es.data[i];
		} else {
			i++;
		}
	}
	if (num == n)
		printf(" %c %d", first ? '=' : '*', n);
	else if (num > 0 && num != 1)
		printf(" %c %d", first ? '=' : '*', num);

	fputc('\n', stdout);
	vector_kill_(&es);

	return 0;
}
// vim:foldmethod=marker:
